package com.dragon.modules.yuegou.model.wallet;

import com.dragon.modules.yuegou.entity.wallet.CardExtractCodeEntity;
import com.dragon.modules.yuegou.enums.wallet.CardExtractCodeStage;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 悦卡赠送提取码模型类
 * 
 * @author pbuilder generated
 * @date 2019-06-03 15:20:35
 * @company sgy
 * @version 2.0
 * @see Length 长度限制
 * @see NotNull 对象非空
 * @see NotEmpty 字符串、集合、表、数组非空
 */
public class CardExtractCode extends CardExtractCodeEntity {

	@ApiModelProperty("被赠悦卡")
	private MemberCard presentCard;

	@ApiModelProperty("提取悦卡")
	private MemberCard extractedCard;
	
	@ApiModelProperty("悦卡模板")
	private CardTemplate cardTemplate;

	/**
	 * 构造一个空悦卡赠送提取码模型对象
	 */
	public CardExtractCode(){
		super();
	}
	
	/**
	 * 依据实体对象的信息构造一个悦卡赠送提取码模型对象
	 * 
	 * @param entity 实体对象
	 */
	public CardExtractCode(CardExtractCodeEntity entity){
		super(entity);
	}

	/**
	 * 依据其它对象的信息构造一个悦卡赠送提取码模型对象
	 * 
	 * @param other 其它对象
	 */
	public CardExtractCode(CardExtractCode other){
		super(other);
	}


	public MemberCard getPresentCard() {
		return presentCard;
	}

	public void setPresentCard(MemberCard presentCard) {
		this.presentCard = presentCard;
	}

	public MemberCard getExtractedCard() {
		return extractedCard;
	}

	public void setExtractedCard(MemberCard extractedCard) {
		this.extractedCard = extractedCard;
	}

	public CardTemplate getCardTemplate() {
		return cardTemplate;
	}

	public void setCardTemplate(CardTemplate cardTemplate) {
		this.cardTemplate = cardTemplate;
	}

	@Override
	public String getId() {
    	return id;
    }

    /**
	 * 设置提取码ID
	 * 
	 * @param id 提取码ID
	 * @return 当前对象
	 */
    public CardExtractCode id(String id) {
    	this.id = id;
    	return this;
    }

	@Override
	public String getCardPresentId() {
    	return cardPresentId;
    }

    /**
	 * 设置悦卡赠送ID
	 * 
	 * @param cardPresentId 悦卡赠送ID
	 * @return 当前对象
	 */
    public CardExtractCode cardPresentId(String cardPresentId) {
    	this.cardPresentId = cardPresentId;
    	return this;
    }

	@Override
	public String getMemberId() {
    	return memberId;
    }

    /**
	 * 设置会员ID（赠送方）（冗余）
	 * 
	 * @param memberId 会员ID（赠送方）（冗余）
	 * @return 当前对象
	 */
    public CardExtractCode memberId(String memberId) {
    	this.memberId = memberId;
    	return this;
    }

	@Override
	public String getCardTemplateId() {
    	return cardTemplateId;
    }

    /**
	 * 设置悦卡模板ID（冗余）
	 * 
	 * @param cardTemplateId 悦卡模板ID（冗余）
	 * @return 当前对象
	 */
    public CardExtractCode cardTemplateId(String cardTemplateId) {
    	this.cardTemplateId = cardTemplateId;
    	return this;
    }

	@Override
	public String getMemberCardId() {
    	return memberCardId;
    }

    /**
	 * 设置会员悦卡ID（冗余）
	 * 
	 * @param memberCardId 会员悦卡ID（冗余）
	 * @return 当前对象
	 */
    public CardExtractCode memberCardId(String memberCardId) {
    	this.memberCardId = memberCardId;
    	return this;
    }

	@Override
	public String getExtractedCode() {
    	return extractedCode;
    }

    /**
	 * 设置提取码
	 * 
	 * @param extractedCode 提取码
	 * @return 当前对象
	 */
    public CardExtractCode extractedCode(String extractedCode) {
    	this.extractedCode = extractedCode;
    	return this;
    }

	@Override
	public String getExtractedMemberId() {
    	return extractedMemberId;
    }

    /**
	 * 设置
	 * 
	 * @param extractedMemberId 
	 * @return 当前对象
	 */
    public CardExtractCode extractedMemberId(String extractedMemberId) {
    	this.extractedMemberId = extractedMemberId;
    	return this;
    }

	@Override
	public LocalDateTime getExtractedTime() {
    	return extractedTime;
    }

    /**
	 * 设置提取时间
	 * 
	 * @param extractedTime 提取时间
	 * @return 当前对象
	 */
    public CardExtractCode extractedTime(LocalDateTime extractedTime) {
    	this.extractedTime = extractedTime;
    	return this;
    }

	@Override
	public String getExtractedMemberCardId() {
    	return extractedMemberCardId;
    }

    /**
	 * 设置赠送生成的悦卡ID（旧悦卡保留）
	 * 
	 * @param extractedMemberCardId 赠送生成的悦卡ID（旧悦卡保留）
	 * @return 当前对象
	 */
    public CardExtractCode extractedMemberCardId(String extractedMemberCardId) {
    	this.extractedMemberCardId = extractedMemberCardId;
    	return this;
    }

	@Override
	public CardExtractCodeStage getStage() {
    	return stage;
    }

    /**
	 * 设置[枚举]赠送阶段：0-赠送中-PRESENTING、1-已提取-EXTRACTED、2-已拒绝-REJECTED、3-已失效-EXPIRED
	 * 
	 * @param stage [枚举]赠送阶段：0-赠送中-PRESENTING、1-已提取-EXTRACTED、2-已拒绝-REJECTED、3-已失效-EXPIRED
	 * @return 当前对象
	 */
    public CardExtractCode stage(CardExtractCodeStage stage) {
    	this.stage = stage;
    	return this;
    }

	@Override
	public LocalDateTime getCreatedTime() {
    	return createdTime;
    }

    /**
	 * 设置赠送时间
	 * 
	 * @param createdTime 赠送时间
	 * @return 当前对象
	 */
    public CardExtractCode createdTime(LocalDateTime createdTime) {
    	this.createdTime = createdTime;
    	return this;
    }

	@Override
	public LocalDateTime getExpiredTime() {
    	return expiredTime;
    }

    /**
	 * 设置失效时间
	 * 
	 * @param expiredTime 失效时间
	 * @return 当前对象
	 */
    public CardExtractCode expiredTime(LocalDateTime expiredTime) {
    	this.expiredTime = expiredTime;
    	return this;
    }
}
